package com.bang.springcloud.provider.api;

import com.bang.springcloud.provider.domain.dto.UserDto;
import com.bang.springcloud.provider.hystrix.UserFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ClassName: UserFeignApi
 * @author: BANG
 * @Date: 2019/12/03 14:04
 * @Version: 1.0
 * @Modified By:
 * @Desc: TODO
 */
@FeignClient(value = "provider-user", fallback = UserFeignHystrix.class)
public interface UserFeignApi {

    /**
     * 获取用户信息
     * @param userId
     * @return
     */
    @GetMapping(value = "/get/{userId}")
    @ResponseBody
    UserDto get(@PathVariable("userId") Long userId);



}
